package com.avic.dal.condition;

import lombok.Data;

/**
 * 统一分页参数
 *
 * @author: huangsheng
 * @date: 2017 /10/19
 */
@Data
public class BasePageCondition {


    /**
     * 展现的页数下标
     */
    private int currentPage;

    /**
     * 每页显示数据的长度
     */
    private int pageSize;

    /**
     * 开始查询的数据下标
     */
    private int start;

    public BasePageCondition(int currentPage, int pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.start = (currentPage - 1) * pageSize;
    }
}
